<?php 
	require_once 'datePicker.php';
?>

<!DOCTYPE html>
<html>
	<head>
		<title>Photo album online | Register Page</title>
		<link rel="stylesheet" type="text/css" href="homePageStyles.css" />
		<script type="text/javascript" src="ajaxValidation.js"></script>
		
		<!-- Disable Paste for the Repeat Email Address Input Field!  -->
		<script>
		window.onload = function() {
			 var emailRepeat = document.getElementById('emailRepeat');
			 emailRepeat.onpaste = function(e) {
			   e.preventDefault();
			 }
			}
		</script>
		
	</head>
	<body onload="validateForm()">
		<nav>
			<ul>
				<li><a href="registerPage.php">Register</a></li>
				<li><a href="loginPage.php">Login</a></li>
				<li><a href="homePage.php">Home</a></li>
			</ul>
		</nav>
		
		<form action="registerPageSrc.php" method="post" name="regForm">
			<label for="username">Username: </label>
			<input type="text" name="username" id="username" onkeyup="checkUsername(this.value)"/><span id="usernameCheck"></span><br />
			<label for="password">Password: </label>
			<input type="password" name="password" id="password" onkeyup="checkPassword(this.value)"/><span id="hint"></span><br />
			<label for="passwordRepeat">Repeat Password: </label>
			<input type="password" name="passwordRepeat" id="passwordRepeat" onkeyup="validatePass(this.value)"/><span id="validatePass"></span><br />
			<?php echo "Birth Date "  .date_picker('birth_date',1900, 2013). "<br />"; ?>
			<label for="email">Email: </label>
			<input type="email" name="email" id="email" onkeyup="checkEmail(this.value)"/><span id="checkExEmail"></span><br />
			<label for="emailRepeat">Repeat Email: </label>
			<input type="email" name="emailRepeat" id="emailRepeat" onkeyup="validateEmail(this.value)" /><span id="validateEmail"></span><br />
			<input type="submit" name="submit" id="submit" value="Register" />
		</form>
	</body>
</html>